package com.example.fingerdemo;

import java.io.FileOutputStream;
import java.io.IOException;

/**
 * Describe
 *
 * @author Created by xuyan
 * @date on 2024/8/18/周日
 */
public class androidbmp {

    public byte[] colorinfor = new byte[1024];

    public androidbmp() {
        priv_BmpColorsInit();
    }

    public void priv_BmpColorsInit() {
        int i;
        for (i = 0; i < 256; i++) {
            colorinfor[i * 4] = colorinfor[i * 4 + 1] = colorinfor[i * 4 + 2] = (byte) i;
            colorinfor[i * 4 + 3] = 0;
        }
    }

    public int save_bmp(String filePath, byte[] bufferdata) throws IOException {

        FileOutputStream fos = new FileOutputStream(filePath);

        fos.write(bufferdata, 0, 256 * 360 + 1078);
        fos.close();
        return 0;
    }

}
